﻿using Carmenta.SpatialAce.Interop.SpatialAce;
using System;
using System.Collections.Generic;

namespace CEPowerPack
{
	public static partial class Factory
	{
		public static SpaceObjects CreateSpaceObjects(IEnumerable<SpaceObject> elements)
		{
			var result = new SpaceObjects();
			foreach(SpaceObject element in elements) { result.Add(element); }
			return result;
		}
		public static List<SpaceObject> ToList(this SpaceObjects elements)
		{
			var result = new List<SpaceObject>();
			foreach(SpaceObject element in elements) { result.Add(element); };
			return result;
		}
		public static ResourceObjects CreateResourceObjects(IEnumerable<ResourceObject> elements)
		{
			var result = new ResourceObjects();
			foreach(ResourceObject element in elements) { result.Add(element); }
			return result;
		}
		public static List<ResourceObject> ToList(this ResourceObjects elements)
		{
			var result = new List<ResourceObject>();
			foreach(ResourceObject element in elements) { result.Add(element); };
			return result;
		}
		public static Points CreatePoints(IEnumerable<Point> elements)
		{
			var result = new Points();
			foreach(Point element in elements) { result.Add(element); }
			return result;
		}
		public static List<Point> ToList(this Points elements)
		{
			var result = new List<Point>();
			foreach(Point element in elements) { result.Add(element); };
			return result;
		}
		public static Lines CreateLines(IEnumerable<Points> elements)
		{
			var result = new Lines();
			foreach(Points element in elements) { result.Add(element); }
			return result;
		}
		public static List<Points> ToList(this Lines elements)
		{
			var result = new List<Points>();
			foreach(Points element in elements) { result.Add(element); };
			return result;
		}
		public static IntPoints CreateIntPoints(IEnumerable<IntPoint> elements)
		{
			var result = new IntPoints();
			foreach(IntPoint element in elements) { result.Add(element); }
			return result;
		}
		public static List<IntPoint> ToList(this IntPoints elements)
		{
			var result = new List<IntPoint>();
			foreach(IntPoint element in elements) { result.Add(element); };
			return result;
		}
		public static Rects CreateRects(IEnumerable<Rect> elements)
		{
			var result = new Rects();
			foreach(Rect element in elements) { result.Add(element); }
			return result;
		}
		public static List<Rect> ToList(this Rects elements)
		{
			var result = new List<Rect>();
			foreach(Rect element in elements) { result.Add(element); };
			return result;
		}
		public static SpaceColors CreateSpaceColors(IEnumerable<SpaceColor> elements)
		{
			var result = new SpaceColors();
			foreach(SpaceColor element in elements) { result.Add(element); }
			return result;
		}
		public static List<SpaceColor> ToList(this SpaceColors elements)
		{
			var result = new List<SpaceColor>();
			foreach(SpaceColor element in elements) { result.Add(element); };
			return result;
		}
		public static Identities CreateIdentities(IEnumerable<String> elements)
		{
			var result = new Identities();
			foreach(String element in elements) { result.Add(element); }
			return result;
		}
		public static List<String> ToList(this Identities elements)
		{
			var result = new List<String>();
			foreach(String element in elements) { result.Add(element); };
			return result;
		}
		public static Conditions CreateConditions(IEnumerable<Condition> elements)
		{
			var result = new Conditions();
			foreach(Condition element in elements) { result.Add(element); }
			return result;
		}
		public static List<Condition> ToList(this Conditions elements)
		{
			var result = new List<Condition>();
			foreach(Condition element in elements) { result.Add(element); };
			return result;
		}
		public static View CreateView(String Name, Drawable Drawable, Layers Layers = null, RefSystem RefSys = null, Double? GeoWidth = null, Point GeoCenter = null, Rect GeoRect = null, Double? MapScale = null, Double? NominalScale = null, Int32? PointerRadius = null, Identities Selection = null, Double? LightHeight = null, Double? LightDirection = null, Boolean? UpdateEnabled = null, Boolean? ProgressiveUpdates = null, AttributeSet Properties = null, GeoRectModeType? GeoRectMode = null, AttributeSet UpdateAttributes = null, ViewGeoPositionType? StartGeoPosition = null)
		{
			var instance = new ViewClass();
			instance.Create(Name, Drawable);
			if (Layers != null) instance.Layers = Layers;
			if (RefSys != null) instance.RefSys = RefSys;
			if (GeoWidth != null) instance.GeoWidth = GeoWidth.Value;
			if (GeoCenter != null) instance.GeoCenter = GeoCenter;
			if (GeoRect != null) instance.GeoRect = GeoRect;
			if (MapScale != null) instance.MapScale = MapScale.Value;
			if (NominalScale != null) instance.NominalScale = NominalScale.Value;
			if (PointerRadius != null) instance.PointerRadius = PointerRadius.Value;
			if (Selection != null) instance.Selection = Selection;
			if (LightHeight != null) instance.LightHeight = LightHeight.Value;
			if (LightDirection != null) instance.LightDirection = LightDirection.Value;
			if (UpdateEnabled != null) instance.UpdateEnabled = UpdateEnabled.Value;
			if (ProgressiveUpdates != null) instance.ProgressiveUpdates = ProgressiveUpdates.Value;
			if (Properties != null) instance.Properties = Properties;
			if (GeoRectMode != null) instance.GeoRectMode = GeoRectMode.Value;
			if (UpdateAttributes != null) instance.UpdateAttributes = UpdateAttributes;
			if (StartGeoPosition != null) instance.StartGeoPosition = StartGeoPosition.Value;
			return instance;
		}
		public static Views CreateViews(IEnumerable<View> elements)
		{
			var result = new Views();
			foreach(View element in elements) { result.Add(element); }
			return result;
		}
		public static List<View> ToList(this Views elements)
		{
			var result = new List<View>();
			foreach(View element in elements) { result.Add(element); };
			return result;
		}
		public static SpaceFont CreateSpaceFont(String Name, String FontName, AttributeSet Properties = null)
		{
			var instance = new SpaceFontClass();
			instance.Create(Name, FontName);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static SpaceFont CreateSpaceFontEx(String Name, String FontName, CharSetType CharSet, AttributeSet Properties = null)
		{
			var instance = new SpaceFontClass();
			instance.CreateEx(Name, FontName, CharSet);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static SpaceFonts CreateSpaceFonts(IEnumerable<SpaceFont> elements)
		{
			var result = new SpaceFonts();
			foreach(SpaceFont element in elements) { result.Add(element); }
			return result;
		}
		public static List<SpaceFont> ToList(this SpaceFonts elements)
		{
			var result = new List<SpaceFont>();
			foreach(SpaceFont element in elements) { result.Add(element); };
			return result;
		}
		public static Raster CreateRaster(RasterFormat Format, Int32 Width, Int32 Height, Object Data, Palette Palette, String BandColorInterpretations)
		{
			var instance = new RasterClass();
			instance.Create(Format, Width, Height, Data, Palette, BandColorInterpretations);
			return instance;
		}
		public static Palette CreatePalette(Int32 Count)
		{
			var instance = new PaletteClass();
			instance.Create(Count);
			return instance;
		}
		public static Drawables CreateDrawables(IEnumerable<Drawable> elements)
		{
			var result = new Drawables();
			foreach(Drawable element in elements) { result.Add(element); }
			return result;
		}
		public static List<Drawable> ToList(this Drawables elements)
		{
			var result = new List<Drawable>();
			foreach(Drawable element in elements) { result.Add(element); };
			return result;
		}
		public static Bitmap CreateBitmap(String Name, Int32 Width, Int32 Height, SpaceColor Background = null, Boolean? DblBuf = null, Boolean? Swap = null, Double? PixWidthM = null, Transform Transform = null, AttributeSet Properties = null)
		{
			var instance = new BitmapClass();
			instance.Create(Name, Width, Height);
			if (Background != null) instance.Background = Background;
			if (DblBuf != null) instance.DblBuf = DblBuf.Value;
			if (Swap != null) instance.Swap = Swap.Value;
			if (PixWidthM != null) instance.PixWidthM = PixWidthM.Value;
			if (Transform != null) instance.Transform = Transform;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static Bitmap CreateBitmapEx(String Name, Int32 Width, Int32 Height, String GraphicsAPI, SpaceColor Background = null, Boolean? DblBuf = null, Boolean? Swap = null, Double? PixWidthM = null, Transform Transform = null, AttributeSet Properties = null)
		{
			var instance = new BitmapClass();
			instance.CreateEx(Name, Width, Height, GraphicsAPI);
			if (Background != null) instance.Background = Background;
			if (DblBuf != null) instance.DblBuf = DblBuf.Value;
			if (Swap != null) instance.Swap = Swap.Value;
			if (PixWidthM != null) instance.PixWidthM = PixWidthM.Value;
			if (Transform != null) instance.Transform = Transform;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static Window CreateWindow(String Name, Int32 X, Int32 Y, Int32 Width, Int32 Height, SpaceColor Background = null, Boolean? DblBuf = null, Boolean? Swap = null, Double? PixWidthM = null, Transform Transform = null, AttributeSet Properties = null)
		{
			var instance = new WindowClass();
			instance.Create(Name, X, Y, Width, Height);
			if (Background != null) instance.Background = Background;
			if (DblBuf != null) instance.DblBuf = DblBuf.Value;
			if (Swap != null) instance.Swap = Swap.Value;
			if (PixWidthM != null) instance.PixWidthM = PixWidthM.Value;
			if (Transform != null) instance.Transform = Transform;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static Window CreateWindowEx(String Name, Int32 X, Int32 Y, Int32 Width, Int32 Height, String GraphicsAPI, SpaceColor Background = null, Boolean? DblBuf = null, Boolean? Swap = null, Double? PixWidthM = null, Transform Transform = null, AttributeSet Properties = null)
		{
			var instance = new WindowClass();
			instance.CreateEx(Name, X, Y, Width, Height, GraphicsAPI);
			if (Background != null) instance.Background = Background;
			if (DblBuf != null) instance.DblBuf = DblBuf.Value;
			if (Swap != null) instance.Swap = Swap.Value;
			if (PixWidthM != null) instance.PixWidthM = PixWidthM.Value;
			if (Transform != null) instance.Transform = Transform;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static WindowRef CreateWindowRef(String Name, Int32 Handle, SpaceColor Background = null, Int32? Width = null, Int32? Height = null, Boolean? DblBuf = null, Boolean? Swap = null, Double? PixWidthM = null, Transform Transform = null, AttributeSet Properties = null)
		{
			var instance = new WindowRefClass();
			instance.Create(Name, Handle);
			if (Background != null) instance.Background = Background;
			if (Width != null) instance.Width = Width.Value;
			if (Height != null) instance.Height = Height.Value;
			if (DblBuf != null) instance.DblBuf = DblBuf.Value;
			if (Swap != null) instance.Swap = Swap.Value;
			if (PixWidthM != null) instance.PixWidthM = PixWidthM.Value;
			if (Transform != null) instance.Transform = Transform;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static WindowRef CreateWindowRefEx(String Name, Int32 Handle, String GraphicsAPI, SpaceColor Background = null, Int32? Width = null, Int32? Height = null, Boolean? DblBuf = null, Boolean? Swap = null, Double? PixWidthM = null, Transform Transform = null, AttributeSet Properties = null)
		{
			var instance = new WindowRefClass();
			instance.CreateEx(Name, Handle, GraphicsAPI);
			if (Background != null) instance.Background = Background;
			if (Width != null) instance.Width = Width.Value;
			if (Height != null) instance.Height = Height.Value;
			if (DblBuf != null) instance.DblBuf = DblBuf.Value;
			if (Swap != null) instance.Swap = Swap.Value;
			if (PixWidthM != null) instance.PixWidthM = PixWidthM.Value;
			if (Transform != null) instance.Transform = Transform;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static BitmapLayer CreateBitmapLayer(String Name, Layers Layers, Boolean? On = null, Int32? MinScale = null, Int32? MaxScale = null, Boolean? Selectable = null, AttributeSet Properties = null, Boolean? Scrollable = null, SpaceColor Background = null, Condition OnCondition = null)
		{
			var instance = new BitmapLayerClass();
			instance.Create(Name, Layers);
			if (On != null) instance.On = On.Value;
			if (MinScale != null) instance.MinScale = MinScale.Value;
			if (MaxScale != null) instance.MaxScale = MaxScale.Value;
			if (Selectable != null) instance.Selectable = Selectable.Value;
			if (Properties != null) instance.Properties = Properties;
			if (Scrollable != null) instance.Scrollable = Scrollable.Value;
			if (Background != null) instance.Background = Background;
			if (OnCondition != null) instance.OnCondition = OnCondition;
			return instance;
		}

		public static BitmapLayer CreateBitmapLayerEx(String Name, Layers Layers, String GraphicsAPI, Boolean? On = null, Int32? MinScale = null, Int32? MaxScale = null, Boolean? Selectable = null, AttributeSet Properties = null, Boolean? Scrollable = null, SpaceColor Background = null, Condition OnCondition = null)
		{
			var instance = new BitmapLayerClass();
			instance.CreateEx(Name, Layers, GraphicsAPI);
			if (On != null) instance.On = On.Value;
			if (MinScale != null) instance.MinScale = MinScale.Value;
			if (MaxScale != null) instance.MaxScale = MaxScale.Value;
			if (Selectable != null) instance.Selectable = Selectable.Value;
			if (Properties != null) instance.Properties = Properties;
			if (Scrollable != null) instance.Scrollable = Scrollable.Value;
			if (Background != null) instance.Background = Background;
			if (OnCondition != null) instance.OnCondition = OnCondition;
			return instance;
		}
		public static Layers CreateLayers(IEnumerable<Layer> elements)
		{
			var result = new Layers();
			foreach(Layer element in elements) { result.Add(element); }
			return result;
		}
		public static List<Layer> ToList(this Layers elements)
		{
			var result = new List<Layer>();
			foreach(Layer element in elements) { result.Add(element); };
			return result;
		}
		public static LayerSet CreateLayerSet(String Name, Layers Layers, Boolean? On = null, Int32? MinScale = null, Int32? MaxScale = null, Boolean? Selectable = null, AttributeSet Properties = null, Condition OnCondition = null)
		{
			var instance = new LayerSetClass();
			instance.Create(Name, Layers);
			if (On != null) instance.On = On.Value;
			if (MinScale != null) instance.MinScale = MinScale.Value;
			if (MaxScale != null) instance.MaxScale = MaxScale.Value;
			if (Selectable != null) instance.Selectable = Selectable.Value;
			if (Properties != null) instance.Properties = Properties;
			if (OnCondition != null) instance.OnCondition = OnCondition;
			return instance;
		}
		public static OrdinaryLayer CreateOrdinaryLayer(String Name, Operators Operators, Boolean? On = null, Int32? MinScale = null, Int32? MaxScale = null, Boolean? Selectable = null, AttributeSet Properties = null, Operator Input = null, Boolean? Buffered = null, Int32? MaxPixLeft = null, Int32? MaxPixRight = null, Int32? MaxPixUp = null, Int32? MaxPixDown = null, Double? MaxGeo = null, Boolean? GroundRelative = null, Condition OnCondition = null)
		{
			var instance = new OrdinaryLayerClass();
			instance.Create(Name, Operators);
			if (On != null) instance.On = On.Value;
			if (MinScale != null) instance.MinScale = MinScale.Value;
			if (MaxScale != null) instance.MaxScale = MaxScale.Value;
			if (Selectable != null) instance.Selectable = Selectable.Value;
			if (Properties != null) instance.Properties = Properties;
			if (Input != null) instance.Input = Input;
			if (Buffered != null) instance.Buffered = Buffered.Value;
			if (MaxPixLeft != null) instance.MaxPixLeft = MaxPixLeft.Value;
			if (MaxPixRight != null) instance.MaxPixRight = MaxPixRight.Value;
			if (MaxPixUp != null) instance.MaxPixUp = MaxPixUp.Value;
			if (MaxPixDown != null) instance.MaxPixDown = MaxPixDown.Value;
			if (MaxGeo != null) instance.MaxGeo = MaxGeo.Value;
			if (GroundRelative != null) instance.GroundRelative = GroundRelative.Value;
			if (OnCondition != null) instance.OnCondition = OnCondition;
			return instance;
		}
		public static ScreenLayer CreateScreenLayer(String Name, Operators Operators, Boolean? On = null, Int32? MinScale = null, Int32? MaxScale = null, Boolean? Selectable = null, AttributeSet Properties = null, Operator Input = null, Boolean? Buffered = null, Int32? MaxPixLeft = null, Int32? MaxPixRight = null, Int32? MaxPixUp = null, Int32? MaxPixDown = null, Double? MaxGeo = null, Condition OnCondition = null)
		{
			var instance = new ScreenLayerClass();
			instance.Create(Name, Operators);
			if (On != null) instance.On = On.Value;
			if (MinScale != null) instance.MinScale = MinScale.Value;
			if (MaxScale != null) instance.MaxScale = MaxScale.Value;
			if (Selectable != null) instance.Selectable = Selectable.Value;
			if (Properties != null) instance.Properties = Properties;
			if (Input != null) instance.Input = Input;
			if (Buffered != null) instance.Buffered = Buffered.Value;
			if (MaxPixLeft != null) instance.MaxPixLeft = MaxPixLeft.Value;
			if (MaxPixRight != null) instance.MaxPixRight = MaxPixRight.Value;
			if (MaxPixUp != null) instance.MaxPixUp = MaxPixUp.Value;
			if (MaxPixDown != null) instance.MaxPixDown = MaxPixDown.Value;
			if (MaxGeo != null) instance.MaxGeo = MaxGeo.Value;
			if (OnCondition != null) instance.OnCondition = OnCondition;
			return instance;
		}
		public static Datasets CreateDatasets(IEnumerable<DataSet> elements)
		{
			var result = new Datasets();
			foreach(DataSet element in elements) { result.Add(element); }
			return result;
		}
		public static List<DataSet> ToList(this Datasets elements)
		{
			var result = new List<DataSet>();
			foreach(DataSet element in elements) { result.Add(element); };
			return result;
		}
		public static InternalStore CreateInternalStore(String Name, RefSystem RefSys, Boolean? UseModList = null, Boolean? ReadOnly = null, Boolean? AttributeFlag = null, Object AttributeList = null, AttributeSet Properties = null)
		{
			var instance = new InternalStoreClass();
			instance.Create(Name, RefSys);
			if (UseModList != null) instance.UseModList = UseModList.Value;
			if (ReadOnly != null) instance.ReadOnly = ReadOnly.Value;
			if (AttributeFlag != null) instance.AttributeFlag = AttributeFlag.Value;
			if (AttributeList != null) instance.AttributeList = AttributeList;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static InternalStore CreateInternalStoreEx(String Name, RefSystem RefSys, Rect Bounds, Boolean? UseModList = null, Boolean? ReadOnly = null, Boolean? AttributeFlag = null, Object AttributeList = null, AttributeSet Properties = null)
		{
			var instance = new InternalStoreClass();
			instance.CreateEx(Name, RefSys, Bounds);
			if (UseModList != null) instance.UseModList = UseModList.Value;
			if (ReadOnly != null) instance.ReadOnly = ReadOnly.Value;
			if (AttributeFlag != null) instance.AttributeFlag = AttributeFlag.Value;
			if (AttributeList != null) instance.AttributeList = AttributeList;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static DataSetSet CreateDataSetSet(String Name, RefSystem RefSys, Boolean? UseModList = null, Boolean? ReadOnly = null, Boolean? AttributeFlag = null, Object AttributeList = null, Datasets Datasets = null, AttributeSet Properties = null)
		{
			var instance = new DataSetSetClass();
			instance.Create(Name, RefSys);
			if (UseModList != null) instance.UseModList = UseModList.Value;
			if (ReadOnly != null) instance.ReadOnly = ReadOnly.Value;
			if (AttributeFlag != null) instance.AttributeFlag = AttributeFlag.Value;
			if (AttributeList != null) instance.AttributeList = AttributeList;
			if (Datasets != null) instance.Datasets = Datasets;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static AttributeDesc CreateAttributeDesc(String Name, AttributeType Type, String Value)
		{
			var instance = new AttributeDescClass();
			instance.Create(Name, Type, Value);
			return instance;
		}
		public static AttributeDescTable CreateAttributeDescTable(IEnumerable<AttributeDesc> elements)
		{
			var result = new AttributeDescTable();
			foreach(AttributeDesc element in elements) { result.Add(element); }
			return result;
		}
		public static List<AttributeDesc> ToList(this AttributeDescTable elements)
		{
			var result = new List<AttributeDesc>();
			foreach(AttributeDesc element in elements) { result.Add(element); };
			return result;
		}
		public static InternalStoreQuery CreateInternalStoreQuery(Boolean? Points = null, Boolean? Lines = null, Boolean? Polygons = null, Boolean? Rasters = null, Boolean? Ordered = null, AttributeSet Properties = null)
		{
			var instance = new InternalStoreQueryClass();
			instance.Create();
			if (Points != null) instance.Points = Points.Value;
			if (Lines != null) instance.Lines = Lines.Value;
			if (Polygons != null) instance.Polygons = Polygons.Value;
			if (Rasters != null) instance.Rasters = Rasters.Value;
			if (Ordered != null) instance.Ordered = Ordered.Value;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static GeoObjects CreateGeoObjects(IEnumerable<GeoObject> elements)
		{
			var result = new GeoObjects();
			foreach(GeoObject element in elements) { result.Add(element); }
			return result;
		}
		public static List<GeoObject> ToList(this GeoObjects elements)
		{
			var result = new List<GeoObject>();
			foreach(GeoObject element in elements) { result.Add(element); };
			return result;
		}
		public static GeoPoint CreateGeoPoint(DataSet DataSet, Point Point, AttributeSet Attributes = null, Points Points = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoPointClass();
			instance.Create(DataSet, Point);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoPoint CreateGeoPointEx(RefSystem RefSys, Point Point, AttributeSet Attributes = null, Points Points = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoPointClass();
			instance.CreateEx(RefSys, Point);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}
		public static GeoLine CreateGeoLine(DataSet DataSet, Points Points, AttributeSet Attributes = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoLineClass();
			instance.Create(DataSet, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoLine CreateGeoLineEx(RefSystem RefSys, Points Points, AttributeSet Attributes = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoLineClass();
			instance.CreateEx(RefSys, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}
		public static GeoPolygon CreateGeoPolygon(DataSet DataSet, Points Points, AttributeSet Attributes = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoPolygonClass();
			instance.Create(DataSet, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoPolygon CreateGeoPolygonEx(RefSystem RefSys, Points Points, AttributeSet Attributes = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoPolygonClass();
			instance.CreateEx(RefSys, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}
		public static GeoRaster CreateGeoRasterMultiBand(DataSet DataSet, RefSystem RefSys, Point SouthWest, Point NorthEast, Int32 Width, Int32 Height, String Bands, Int32 DataSize, Object Values, AttributeSet Attributes = null, Points Points = null, Point SW = null, Point NE = null, Int32? UndefinedValue = null, Boolean? Continuous = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null, Object UndefinedValueEx = null, GeoRasterValueType? CellValueType = null)
		{
			var instance = new GeoRasterClass();
			instance.CreateMultiBand(DataSet, RefSys, SouthWest, NorthEast, Width, Height, Bands, DataSize, Values);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (SW != null) instance.SW = SW;
			if (NE != null) instance.NE = NE;
			if (UndefinedValue != null) instance.UndefinedValue = UndefinedValue.Value;
			if (Continuous != null) instance.Continuous = Continuous.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			if (UndefinedValueEx != null) instance.UndefinedValueEx = UndefinedValueEx;
			if (CellValueType != null) instance.CellValueType = CellValueType.Value;
			return instance;
		}

		public static GeoRaster CreateGeoRasterFromFile(DataSet DataSet, RefSystem RefSys, Point SouthWest, Point NorthEast, String Path, AttributeSet Attributes = null, Points Points = null, Point SW = null, Point NE = null, Object Values = null, Int32? UndefinedValue = null, Boolean? Continuous = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null, Object UndefinedValueEx = null, GeoRasterValueType? CellValueType = null)
		{
			var instance = new GeoRasterClass();
			instance.CreateFromFile(DataSet, RefSys, SouthWest, NorthEast, Path);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (SW != null) instance.SW = SW;
			if (NE != null) instance.NE = NE;
			if (Values != null) instance.Values = Values;
			if (UndefinedValue != null) instance.UndefinedValue = UndefinedValue.Value;
			if (Continuous != null) instance.Continuous = Continuous.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			if (UndefinedValueEx != null) instance.UndefinedValueEx = UndefinedValueEx;
			if (CellValueType != null) instance.CellValueType = CellValueType.Value;
			return instance;
		}

		public static GeoRaster CreateGeoRasterFromImageData(DataSet DataSet, RefSystem RefSys, Point SouthWest, Point NorthEast, Byte[] Data, String Format, AttributeSet Attributes = null, Points Points = null, Point SW = null, Point NE = null, Object Values = null, Int32? UndefinedValue = null, Boolean? Continuous = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null, Object UndefinedValueEx = null, GeoRasterValueType? CellValueType = null)
		{
			var instance = new GeoRasterClass();
			instance.CreateFromImageData(DataSet, RefSys, SouthWest, NorthEast, Data, Format);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (SW != null) instance.SW = SW;
			if (NE != null) instance.NE = NE;
			if (Values != null) instance.Values = Values;
			if (UndefinedValue != null) instance.UndefinedValue = UndefinedValue.Value;
			if (Continuous != null) instance.Continuous = Continuous.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			if (UndefinedValueEx != null) instance.UndefinedValueEx = UndefinedValueEx;
			if (CellValueType != null) instance.CellValueType = CellValueType.Value;
			return instance;
		}

		public static GeoRaster CreateGeoRasterEx2(RefSystem RefSys, Point SW, Point NE, Int32 Width, Int32 Height, Int32 BitDepth, Int32 DefaultValue, AttributeSet Attributes = null, Points Points = null, Object Values = null, Int32? UndefinedValue = null, Boolean? Continuous = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null, Object UndefinedValueEx = null, GeoRasterValueType? CellValueType = null)
		{
			var instance = new GeoRasterClass();
			instance.CreateEx2(RefSys, SW, NE, Width, Height, BitDepth, DefaultValue);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (Values != null) instance.Values = Values;
			if (UndefinedValue != null) instance.UndefinedValue = UndefinedValue.Value;
			if (Continuous != null) instance.Continuous = Continuous.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			if (UndefinedValueEx != null) instance.UndefinedValueEx = UndefinedValueEx;
			if (CellValueType != null) instance.CellValueType = CellValueType.Value;
			return instance;
		}

		public static GeoRaster CreateGeoRaster(DataSet DataSet, Point SW, Point NE, Int32 Width, Int32 Height, Int32 BitDepth, Object Values, AttributeSet Attributes = null, Points Points = null, Int32? UndefinedValue = null, Boolean? Continuous = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null, Object UndefinedValueEx = null, GeoRasterValueType? CellValueType = null)
		{
			var instance = new GeoRasterClass();
			instance.Create(DataSet, SW, NE, Width, Height, BitDepth, Values);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (UndefinedValue != null) instance.UndefinedValue = UndefinedValue.Value;
			if (Continuous != null) instance.Continuous = Continuous.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			if (UndefinedValueEx != null) instance.UndefinedValueEx = UndefinedValueEx;
			if (CellValueType != null) instance.CellValueType = CellValueType.Value;
			return instance;
		}

		public static GeoRaster CreateGeoRasterEx(RefSystem RefSys, Point SW, Point NE, Int32 Width, Int32 Height, Int32 BitDepth, Object Values, AttributeSet Attributes = null, Points Points = null, Int32? UndefinedValue = null, Boolean? Continuous = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null, Object UndefinedValueEx = null, GeoRasterValueType? CellValueType = null)
		{
			var instance = new GeoRasterClass();
			instance.CreateEx(RefSys, SW, NE, Width, Height, BitDepth, Values);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (UndefinedValue != null) instance.UndefinedValue = UndefinedValue.Value;
			if (Continuous != null) instance.Continuous = Continuous.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			if (UndefinedValueEx != null) instance.UndefinedValueEx = UndefinedValueEx;
			if (CellValueType != null) instance.CellValueType = CellValueType.Value;
			return instance;
		}
		public static GeoMesh CreateGeoMesh(DataSet DataSet, Points Points, AttributeSet Attributes = null, Object Triangles = null, GeoMeshType? MeshType = null, Boolean? Ground = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoMeshClass();
			instance.Create(DataSet, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Triangles != null) instance.Triangles = Triangles;
			if (MeshType != null) instance.MeshType = MeshType.Value;
			if (Ground != null) instance.Ground = Ground.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoMesh CreateGeoMeshEx(RefSystem RefSys, Points Points, AttributeSet Attributes = null, Object Triangles = null, GeoMeshType? MeshType = null, Boolean? Ground = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoMeshClass();
			instance.CreateEx(RefSys, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Triangles != null) instance.Triangles = Triangles;
			if (MeshType != null) instance.MeshType = MeshType.Value;
			if (Ground != null) instance.Ground = Ground.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}
		public static GeoEllipse CreateGeoEllipseEllipse(DataSet DataSet, Point CenterPoint, Double Radius, Double RadiusDirection, Double Ratio, Int32 ArcAccuracy, AttributeSet Attributes = null, Points Points = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoEllipseClass();
			instance.CreateEllipse(DataSet, CenterPoint, Radius, RadiusDirection, Ratio, ArcAccuracy);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoEllipse CreateGeoEllipseEllipseEx(RefSystem RefSys, Point CenterPoint, Double Radius, Double RadiusDirection, Double Ratio, Int32 ArcAccuracy, AttributeSet Attributes = null, Points Points = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoEllipseClass();
			instance.CreateEllipseEx(RefSys, CenterPoint, Radius, RadiusDirection, Ratio, ArcAccuracy);
			if (Attributes != null) instance.Attributes = Attributes;
			if (Points != null) instance.Points = Points;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoEllipse CreateGeoEllipse(DataSet DataSet, Points Points, AttributeSet Attributes = null, Point CenterPoint = null, Double? Radius = null, Double? RadiusDirection = null, Double? Ratio = null, Int32? ArcAccuracy = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoEllipseClass();
			instance.Create(DataSet, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (CenterPoint != null) instance.CenterPoint = CenterPoint;
			if (Radius != null) instance.Radius = Radius.Value;
			if (RadiusDirection != null) instance.RadiusDirection = RadiusDirection.Value;
			if (Ratio != null) instance.Ratio = Ratio.Value;
			if (ArcAccuracy != null) instance.ArcAccuracy = ArcAccuracy.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}

		public static GeoEllipse CreateGeoEllipseEx(RefSystem RefSys, Points Points, AttributeSet Attributes = null, Point CenterPoint = null, Double? Radius = null, Double? RadiusDirection = null, Double? Ratio = null, Int32? ArcAccuracy = null, IGeometry Geometry = null, Double? BoundsMargin = null, LengthUnitType? BoundsMarginUnit = null)
		{
			var instance = new GeoEllipseClass();
			instance.CreateEx(RefSys, Points);
			if (Attributes != null) instance.Attributes = Attributes;
			if (CenterPoint != null) instance.CenterPoint = CenterPoint;
			if (Radius != null) instance.Radius = Radius.Value;
			if (RadiusDirection != null) instance.RadiusDirection = RadiusDirection.Value;
			if (Ratio != null) instance.Ratio = Ratio.Value;
			if (ArcAccuracy != null) instance.ArcAccuracy = ArcAccuracy.Value;
			if (Geometry != null) instance.Geometry = Geometry;
			if (BoundsMargin != null) instance.BoundsMargin = BoundsMargin.Value;
			if (BoundsMarginUnit != null) instance.BoundsMarginUnit = BoundsMarginUnit.Value;
			return instance;
		}
		public static Visualizers CreateVisualizers(IEnumerable<Visualizer> elements)
		{
			var result = new Visualizers();
			foreach(Visualizer element in elements) { result.Add(element); }
			return result;
		}
		public static List<Visualizer> ToList(this Visualizers elements)
		{
			var result = new List<Visualizer>();
			foreach(Visualizer element in elements) { result.Add(element); };
			return result;
		}
		public static PointVisualizers CreatePointVisualizers(IEnumerable<IPointVis> elements)
		{
			var result = new PointVisualizers();
			foreach(IPointVis element in elements) { result.Add(element); }
			return result;
		}
		public static List<IPointVis> ToList(this PointVisualizers elements)
		{
			var result = new List<IPointVis>();
			foreach(IPointVis element in elements) { result.Add(element); };
			return result;
		}
		public static TextVis CreateTextVis(String Name, Condition Condition = null, AttributeVariable Color = null, AttributeVariable OffsetX = null, AttributeVariable OffsetY = null, AttributeVariable OffsetZ = null, AttributeVariable ScaleFactor = null, AttributeVariable Rotation = null, Boolean? AzimuthRotation = null, Double? At = null, RepeatType? Repeat = null, RotationType? RotationMode = null, Boolean? Leadline = null, AttributeVariable AntiAlias = null, AttributeVariable AtCenter = null, LabelOrgParams LabelOrgParams = null, AttributeVariable WorldCoords = null, AttributeVariable Text = null, AttributeVariable CharacterIndex = null, AttributeVariable Font = null, AlignXType? AlignX = null, AlignYType? AlignY = null, AttributeVariable BackgroundColor = null, AttributeVariable Background = null, AttributeVariable BackgroundOutlineWidth = null, AttributeVariable BackgroundOutlineColor = null, AttributeVariable BackgroundPadding = null, AttributeVariable FollowLine = null, LeadLineParams LeadLineParams = null, AttributeVariable LengthUnit = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new TextVisClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (Color != null) instance.Color = Color;
			if (OffsetX != null) instance.OffsetX = OffsetX;
			if (OffsetY != null) instance.OffsetY = OffsetY;
			if (OffsetZ != null) instance.OffsetZ = OffsetZ;
			if (ScaleFactor != null) instance.ScaleFactor = ScaleFactor;
			if (Rotation != null) instance.Rotation = Rotation;
			if (AzimuthRotation != null) instance.AzimuthRotation = AzimuthRotation.Value;
			if (At != null) instance.At = At.Value;
			if (Repeat != null) instance.Repeat = Repeat.Value;
			if (RotationMode != null) instance.RotationMode = RotationMode.Value;
			if (Leadline != null) instance.Leadline = Leadline.Value;
			if (AntiAlias != null) instance.AntiAlias = AntiAlias;
			if (AtCenter != null) instance.AtCenter = AtCenter;
			if (LabelOrgParams != null) instance.LabelOrgParams = LabelOrgParams;
			if (WorldCoords != null) instance.WorldCoords = WorldCoords;
			if (Text != null) instance.Text = Text;
			if (CharacterIndex != null) instance.CharacterIndex = CharacterIndex;
			if (Font != null) instance.Font = Font;
			if (AlignX != null) instance.AlignX = AlignX.Value;
			if (AlignY != null) instance.AlignY = AlignY.Value;
			if (BackgroundColor != null) instance.BackgroundColor = BackgroundColor;
			if (Background != null) instance.Background = Background;
			if (BackgroundOutlineWidth != null) instance.BackgroundOutlineWidth = BackgroundOutlineWidth;
			if (BackgroundOutlineColor != null) instance.BackgroundOutlineColor = BackgroundOutlineColor;
			if (BackgroundPadding != null) instance.BackgroundPadding = BackgroundPadding;
			if (FollowLine != null) instance.FollowLine = FollowLine;
			if (LeadLineParams != null) instance.LeadLineParams = LeadLineParams;
			if (LengthUnit != null) instance.LengthUnit = LengthUnit;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static RasterVis CreateRasterVis(String Name, Condition Condition = null, AttributeVariable Color = null, Int16? Alpha = null, AlphaMethodType? AlphaMethod = null, RasterFilterType? Filter = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new RasterVisClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (Color != null) instance.Color = Color;
			if (Alpha != null) instance.Alpha = Alpha.Value;
			if (AlphaMethod != null) instance.AlphaMethod = AlphaMethod.Value;
			if (Filter != null) instance.Filter = Filter.Value;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static LineVis CreateLineVis(String Name, Condition Condition = null, AttributeVariable Color = null, AttributeVariable Width = null, AttributeVariable Style = null, AttributeVariable AntiAlias = null, LineCap? LineCap = null, LineJoin? LineJoin = null, AttributeVariable WorldCoords = null, AttributeVariable OrthogonalOffset = null, AttributeVariable LengthUnit = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new LineVisClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (Color != null) instance.Color = Color;
			if (Width != null) instance.Width = Width;
			if (Style != null) instance.Style = Style;
			if (AntiAlias != null) instance.AntiAlias = AntiAlias;
			if (LineCap != null) instance.LineCap = LineCap.Value;
			if (LineJoin != null) instance.LineJoin = LineJoin.Value;
			if (WorldCoords != null) instance.WorldCoords = WorldCoords;
			if (OrthogonalOffset != null) instance.OrthogonalOffset = OrthogonalOffset;
			if (LengthUnit != null) instance.LengthUnit = LengthUnit;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static PolygonVis CreatePolygonVis(String Name, Condition Condition = null, AttributeVariable Color = null, AttributeVariable Pattern = null, AttributeVariable AntiAlias = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new PolygonVisClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (Color != null) instance.Color = Color;
			if (Pattern != null) instance.Pattern = Pattern;
			if (AntiAlias != null) instance.AntiAlias = AntiAlias;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static SymbolVis CreateSymbolVis(String Name, Condition Condition = null, AttributeVariable Color = null, AttributeVariable OffsetX = null, AttributeVariable OffsetY = null, AttributeVariable OffsetZ = null, AttributeVariable ScaleFactor = null, AttributeVariable Rotation = null, Boolean? AzimuthRotation = null, Double? At = null, RepeatType? Repeat = null, RotationType? RotationMode = null, Boolean? Leadline = null, AttributeVariable AntiAlias = null, AttributeVariable AtCenter = null, LabelOrgParams LabelOrgParams = null, AttributeVariable WorldCoords = null, AttributeVariable Symbol = null, AttributeVariable Pitch = null, AttributeVariable Roll = null, LeadLineParams LeadLineParams = null, AttributeVariable LengthUnit = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new SymbolVisClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (Color != null) instance.Color = Color;
			if (OffsetX != null) instance.OffsetX = OffsetX;
			if (OffsetY != null) instance.OffsetY = OffsetY;
			if (OffsetZ != null) instance.OffsetZ = OffsetZ;
			if (ScaleFactor != null) instance.ScaleFactor = ScaleFactor;
			if (Rotation != null) instance.Rotation = Rotation;
			if (AzimuthRotation != null) instance.AzimuthRotation = AzimuthRotation.Value;
			if (At != null) instance.At = At.Value;
			if (Repeat != null) instance.Repeat = Repeat.Value;
			if (RotationMode != null) instance.RotationMode = RotationMode.Value;
			if (Leadline != null) instance.Leadline = Leadline.Value;
			if (AntiAlias != null) instance.AntiAlias = AntiAlias;
			if (AtCenter != null) instance.AtCenter = AtCenter;
			if (LabelOrgParams != null) instance.LabelOrgParams = LabelOrgParams;
			if (WorldCoords != null) instance.WorldCoords = WorldCoords;
			if (Symbol != null) instance.Symbol = Symbol;
			if (Pitch != null) instance.Pitch = Pitch;
			if (Roll != null) instance.Roll = Roll;
			if (LeadLineParams != null) instance.LeadLineParams = LeadLineParams;
			if (LengthUnit != null) instance.LengthUnit = LengthUnit;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static PointVisSet CreatePointVisSet(String Name, Condition Condition = null, AttributeVariable Color = null, AttributeVariable OffsetX = null, AttributeVariable OffsetY = null, AttributeVariable OffsetZ = null, AttributeVariable ScaleFactor = null, AttributeVariable Rotation = null, Boolean? AzimuthRotation = null, Double? At = null, RepeatType? Repeat = null, RotationType? RotationMode = null, Boolean? Leadline = null, AttributeVariable AntiAlias = null, AttributeVariable AtCenter = null, LabelOrgParams LabelOrgParams = null, AttributeVariable WorldCoords = null, AlignXType? AlignX = null, AlignYType? AlignY = null, AttributeVariable BackgroundColor = null, AttributeVariable Background = null, AttributeVariable BackgroundOutlineWidth = null, AttributeVariable BackgroundOutlineColor = null, AttributeVariable BackgroundPadding = null, PointVisualizers VisList = null, LeadLineParams LeadLineParams = null, AttributeVariable LengthUnit = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new PointVisSetClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (Color != null) instance.Color = Color;
			if (OffsetX != null) instance.OffsetX = OffsetX;
			if (OffsetY != null) instance.OffsetY = OffsetY;
			if (OffsetZ != null) instance.OffsetZ = OffsetZ;
			if (ScaleFactor != null) instance.ScaleFactor = ScaleFactor;
			if (Rotation != null) instance.Rotation = Rotation;
			if (AzimuthRotation != null) instance.AzimuthRotation = AzimuthRotation.Value;
			if (At != null) instance.At = At.Value;
			if (Repeat != null) instance.Repeat = Repeat.Value;
			if (RotationMode != null) instance.RotationMode = RotationMode.Value;
			if (Leadline != null) instance.Leadline = Leadline.Value;
			if (AntiAlias != null) instance.AntiAlias = AntiAlias;
			if (AtCenter != null) instance.AtCenter = AtCenter;
			if (LabelOrgParams != null) instance.LabelOrgParams = LabelOrgParams;
			if (WorldCoords != null) instance.WorldCoords = WorldCoords;
			if (AlignX != null) instance.AlignX = AlignX.Value;
			if (AlignY != null) instance.AlignY = AlignY.Value;
			if (BackgroundColor != null) instance.BackgroundColor = BackgroundColor;
			if (Background != null) instance.Background = Background;
			if (BackgroundOutlineWidth != null) instance.BackgroundOutlineWidth = BackgroundOutlineWidth;
			if (BackgroundOutlineColor != null) instance.BackgroundOutlineColor = BackgroundOutlineColor;
			if (BackgroundPadding != null) instance.BackgroundPadding = BackgroundPadding;
			if (VisList != null) instance.VisList = VisList;
			if (LeadLineParams != null) instance.LeadLineParams = LeadLineParams;
			if (LengthUnit != null) instance.LengthUnit = LengthUnit;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static VisSet CreateVisSet(String Name, Condition Condition = null, Visualizers VisList = null, AttributeVariable PickingSupport = null, AttributeSet Properties = null)
		{
			var instance = new VisSetClass();
			instance.Create(Name);
			if (Condition != null) instance.Condition = Condition;
			if (VisList != null) instance.VisList = VisList;
			if (PickingSupport != null) instance.PickingSupport = PickingSupport;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static LineStyles CreateLineStyles(IEnumerable<LineStyle> elements)
		{
			var result = new LineStyles();
			foreach(LineStyle element in elements) { result.Add(element); }
			return result;
		}
		public static List<LineStyle> ToList(this LineStyles elements)
		{
			var result = new List<LineStyle>();
			foreach(LineStyle element in elements) { result.Add(element); };
			return result;
		}
		public static ComplexLine CreateComplexLine(String Name, Rect DefinitionRect, Lines Sublines, Double SublineWidth)
		{
			var instance = new ComplexLineClass();
			instance.Create(Name, DefinitionRect, Sublines, SublineWidth);
			return instance;
		}
		public static DashedLine CreateDashedLine(String Name, Object Dashes)
		{
			var instance = new DashedLineClass();
			instance.Create(Name, Dashes);
			return instance;
		}
		public static SymbolObjects CreateSymbolObjects(IEnumerable<SymbolObject> elements)
		{
			var result = new SymbolObjects();
			foreach(SymbolObject element in elements) { result.Add(element); }
			return result;
		}
		public static List<SymbolObject> ToList(this SymbolObjects elements)
		{
			var result = new List<SymbolObject>();
			foreach(SymbolObject element in elements) { result.Add(element); };
			return result;
		}
		public static RasterSymbol CreateRasterSymbolEx(String Name, Int16 XHot, Int16 YHot, String Path, String FileName, AttributeSet Properties = null)
		{
			var instance = new RasterSymbolClass();
			instance.CreateEx(Name, XHot, YHot, Path, FileName);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static RasterSymbol CreateRasterSymbol(String Name, Int16 Height, Int16 Width, Int16 XHot, Int16 YHot, Object Image, AttributeSet Properties = null)
		{
			var instance = new RasterSymbolClass();
			instance.Create(Name, Height, Width, XHot, YHot, Image);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static VectorSymbol CreateVectorSymbol(String Name, Lines Sublines, Double SublineWidth, AttributeSet Properties = null)
		{
			var instance = new VectorSymbolClass();
			instance.Create(Name, Sublines, SublineWidth);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static Operators CreateOperators(IEnumerable<Operator> elements)
		{
			var result = new Operators();
			foreach(Operator element in elements) { result.Add(element); }
			return result;
		}
		public static List<Operator> ToList(this Operators elements)
		{
			var result = new List<Operator>();
			foreach(Operator element in elements) { result.Add(element); };
			return result;
		}
		public static ReadOp CreateReadOp(String Name, Operator Input = null, DataSet DataSet = null, DataSetQuery Query = null, AttributeSet Properties = null)
		{
			var instance = new ReadOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (DataSet != null) instance.DataSet = DataSet;
			if (Query != null) instance.Query = Query;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static RenderOp CreateRenderOp(String Name, Operator Input = null, Visualizers VisList = null, Visualizers SelectionVisList = null, RenderOpModeType? Mode = null, AttributeSet Properties = null)
		{
			var instance = new RenderOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (VisList != null) instance.VisList = VisList;
			if (SelectionVisList != null) instance.SelectionVisList = SelectionVisList;
			if (Mode != null) instance.Mode = Mode.Value;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static SplitOp CreateSplitOp(String Name, Operator Input = null, AttributeSet Properties = null)
		{
			var instance = new SplitOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static SplitEntryOp CreateSplitEntryOp(String Name, Operator Input = null, AttributeSet Properties = null)
		{
			var instance = new SplitEntryOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static RectClipOp CreateRectClipOp(String Name, Operator Input = null, Boolean? UseGeoRect = null, Rect Rect = null, Boolean? RealignRasters = null, Boolean? UseViewGeoRect = null, AttributeSet Properties = null)
		{
			var instance = new RectClipOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (UseGeoRect != null) instance.UseGeoRect = UseGeoRect.Value;
			if (Rect != null) instance.Rect = Rect;
			if (RealignRasters != null) instance.RealignRasters = RealignRasters.Value;
			if (UseViewGeoRect != null) instance.UseViewGeoRect = UseViewGeoRect.Value;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static FunnelOp CreateFunnelOp(String Name, Operator Input = null, Operators Inputs = null, AttributeSet Properties = null)
		{
			var instance = new FunnelOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (Inputs != null) instance.Inputs = Inputs;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static LevelOfDetailOp CreateLevelOfDetailOp(String Name, Operator Input = null, Operators Inputs = null, LevelOfDetailCriteria? Criteria = null, LevelOfDetailTable Table = null, Boolean? FillGeoRect = null, AttributeSet Properties = null)
		{
			var instance = new LevelOfDetailOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (Inputs != null) instance.Inputs = Inputs;
			if (Criteria != null) instance.Criteria = Criteria.Value;
			if (Table != null) instance.Table = Table;
			if (FillGeoRect != null) instance.FillGeoRect = FillGeoRect.Value;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static SwitchOp CreateSwitchOp(String Name, Operator Input = null, Operators Inputs = null, Boolean? On = null, Double? MinScale = null, Double? MaxScale = null, AttributeSet Properties = null, Condition OnCondition = null)
		{
			var instance = new SwitchOpClass();
			instance.Create(Name);
			if (Input != null) instance.Input = Input;
			if (Inputs != null) instance.Inputs = Inputs;
			if (On != null) instance.On = On.Value;
			if (MinScale != null) instance.MinScale = MinScale.Value;
			if (MaxScale != null) instance.MaxScale = MaxScale.Value;
			if (Properties != null) instance.Properties = Properties;
			if (OnCondition != null) instance.OnCondition = OnCondition;
			return instance;
		}
		public static RefSystem CreateRefSystem(String Name, Int32 Id, Projection Projection, GeodeticDatum GeodeticDatum, DatumShiftAlgorithmType? DatumShiftAlgorithm = null, AttributeSet Properties = null)
		{
			var instance = new RefSystemClass();
			instance.Create(Name, Id, Projection, GeodeticDatum);
			if (DatumShiftAlgorithm != null) instance.DatumShiftAlgorithm = DatumShiftAlgorithm.Value;
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static RefSystems CreateRefSystems(IEnumerable<RefSystem> elements)
		{
			var result = new RefSystems();
			foreach(RefSystem element in elements) { result.Add(element); }
			return result;
		}
		public static List<RefSystem> ToList(this RefSystems elements)
		{
			var result = new List<RefSystem>();
			foreach(RefSystem element in elements) { result.Add(element); };
			return result;
		}
		public static RefSystemFactory CreateRefSystemFactoryRefSystem(String Name, Int32 Id, Projection Projection, GeodeticDatum GeodeticDatum)
		{
			var instance = new RefSystemFactoryClass();
			instance.CreateRefSystem(Name, Id, Projection, GeodeticDatum);
			return instance;
		}

		public static RefSystemFactory CreateRefSystemFactoryRefSystemForArea(String Name, Point LoLaSW, Point LoLaNE, GeodeticDatum GeodeticDatum)
		{
			var instance = new RefSystemFactoryClass();
			instance.CreateRefSystemForArea(Name, LoLaSW, LoLaNE, GeodeticDatum);
			return instance;
		}

		public static RefSystemFactory CreateRefSystemFactoryUTMRefSystemFromPoint(Point Point)
		{
			var instance = new RefSystemFactoryClass();
			instance.CreateUTMRefSystemFromPoint(Point);
			return instance;
		}
		public static GeodeticDatum CreateGeodeticDatum(String Name, Int32 Id, Point dXYZ, Double EquatorialRadius, Double Flattening, AttributeSet Properties = null)
		{
			var instance = new GeodeticDatumClass();
			instance.Create(Name, Id, dXYZ, EquatorialRadius, Flattening);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static GeodeticDatum CreateGeodeticDatumEx(String Name, Int32 Id, Point dXYZ, Point dXYZ7, Double OmegaX, Double OmegaY, Double OmegaZ, Double ScaleParam, Double EquatorialRadius, Double Flattening, AttributeSet Properties = null)
		{
			var instance = new GeodeticDatumClass();
			instance.CreateEx(Name, Id, dXYZ, dXYZ7, OmegaX, OmegaY, OmegaZ, ScaleParam, EquatorialRadius, Flattening);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static GeodeticDatums CreateGeodeticDatums(IEnumerable<GeodeticDatum> elements)
		{
			var result = new GeodeticDatums();
			foreach(GeodeticDatum element in elements) { result.Add(element); }
			return result;
		}
		public static List<GeodeticDatum> ToList(this GeodeticDatums elements)
		{
			var result = new List<GeodeticDatum>();
			foreach(GeodeticDatum element in elements) { result.Add(element); };
			return result;
		}
		public static Projections CreateProjections(IEnumerable<Projection> elements)
		{
			var result = new Projections();
			foreach(Projection element in elements) { result.Add(element); }
			return result;
		}
		public static List<Projection> ToList(this Projections elements)
		{
			var result = new List<Projection>();
			foreach(Projection element in elements) { result.Add(element); };
			return result;
		}
		public static AzimuthalEqualArea CreateAzimuthalEqualArea(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double CentralLatitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, ProjectionPurpose purpose, AttributeSet Properties = null)
		{
			var instance = new AzimuthalEqualAreaClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitude, CentralLatitude, FalseEasting, FalseNorthing, ScaleFactor, purpose);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static AzimuthalEquidistant CreateAzimuthalEquidistant(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double CentralLatitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, ProjectionPurpose purpose, AttributeSet Properties = null)
		{
			var instance = new AzimuthalEquidistantClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitude, CentralLatitude, FalseEasting, FalseNorthing, ScaleFactor, purpose);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static UTM CreateUTM(Int16 Zone, AttributeSet Properties = null)
		{
			var instance = new UTMClass();
			instance.Create(Zone);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static RectangularProjection CreateRectangularProjection(String Name, Int32 Id, LengthUnitType LengthUnit, AttributeSet Properties = null)
		{
			var instance = new RectangularProjectionClass();
			instance.Create(Name, Id, LengthUnit);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static LoLaParam CreateLoLaParam(String Name, Int32 Id, Double CentralLatitude, AttributeSet Properties = null)
		{
			var instance = new LoLaParamClass();
			instance.Create(Name, Id, CentralLatitude);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static Mercator CreateMercatorEx(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, Double LatitudeSP, ProjectionFormulaType Variant, AttributeSet Properties = null)
		{
			var instance = new MercatorClass();
			instance.CreateEx(Name, Id, LengthUnit, CentralLongitude, FalseEasting, FalseNorthing, ScaleFactor, LatitudeSP, Variant);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static Mercator CreateMercator(String Name, Int32 Id, LengthUnitType LengthUnit, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, AttributeSet Properties = null)
		{
			var instance = new MercatorClass();
			instance.Create(Name, Id, LengthUnit, FalseEasting, FalseNorthing, ScaleFactor);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static Miller CreateMiller(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, Double LatitudeSP, Double Compromise, AttributeSet Properties = null)
		{
			var instance = new MillerClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitude, FalseEasting, FalseNorthing, ScaleFactor, LatitudeSP, Compromise);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static TransverseMercator CreateTransverseMercator(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, AttributeSet Properties = null)
		{
			var instance = new TransverseMercatorClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitude, FalseEasting, FalseNorthing, ScaleFactor);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static TransverseMercator CreateTransverseMercatorEx(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double CentralLatitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, AttributeSet Properties = null)
		{
			var instance = new TransverseMercatorClass();
			instance.CreateEx(Name, Id, LengthUnit, CentralLongitude, CentralLatitude, FalseEasting, FalseNorthing, ScaleFactor);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static LambertConformalConic2SP CreateLambertConformalConic2SP(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitude, Double CentralLatitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, Double LatitudeSP1, Double LatitudeSP2, AttributeSet Properties = null)
		{
			var instance = new LambertConformalConic2SPClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitude, CentralLatitude, FalseEasting, FalseNorthing, ScaleFactor, LatitudeSP1, LatitudeSP2);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static PolarStereographic CreatePolarStereographicWithStandardParallel(String Name, Int32 Id, Boolean NorthPole, LengthUnitType LengthUnit, Double CentralLongitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, Double LatitudeSP, AttributeSet Properties = null)
		{
			var instance = new PolarStereographicClass();
			instance.CreateWithStandardParallel(Name, Id, NorthPole, LengthUnit, CentralLongitude, FalseEasting, FalseNorthing, ScaleFactor, LatitudeSP);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}

		public static PolarStereographic CreatePolarStereographic(String Name, Int32 Id, Boolean NorthPole, LengthUnitType LengthUnit, Double CentralLongitude, Double FalseEasting, Double FalseNorthing, Double ScaleFactor, AttributeSet Properties = null)
		{
			var instance = new PolarStereographicClass();
			instance.Create(Name, Id, NorthPole, LengthUnit, CentralLongitude, FalseEasting, FalseNorthing, ScaleFactor);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static DynamicLocal CreateDynamicLocal(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitud, Double CentralLatitude, Double ScaleFactor, Double Up, AttributeSet Properties = null)
		{
			var instance = new DynamicLocalClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitud, CentralLatitude, ScaleFactor, Up);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static Orthographic CreateOrthographic(String Name, Int32 Id, LengthUnitType LengthUnit, Double CentralLongitud, Double CentralLatitude, Double ScaleFactor, AttributeSet Properties = null)
		{
			var instance = new OrthographicClass();
			instance.Create(Name, Id, LengthUnit, CentralLongitud, CentralLatitude, ScaleFactor);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static RotatedProjection CreateRotatedProjection(String Name, Int32 Id, Projection BaseProj, Double CentralLongitud, Double CentralLatitude, Double Up, AttributeSet Properties = null)
		{
			var instance = new RotatedProjectionClass();
			instance.Create(Name, Id, BaseProj, CentralLongitud, CentralLatitude, Up);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static ProjectParams CreateProjectParams(AttributeVariable EdgesToSegmentize = null, AttributeVariable EdgeLengthMax = null, AttributeVariable RasterDisplacementMax = null)
		{
			var instance = new ProjectParamsClass();
			instance.Create();
			if (EdgesToSegmentize != null) instance.EdgesToSegmentize = EdgesToSegmentize;
			if (EdgeLengthMax != null) instance.EdgeLengthMax = EdgeLengthMax;
			if (RasterDisplacementMax != null) instance.RasterDisplacementMax = RasterDisplacementMax;
			return instance;
		}
		public static PresentationObjects CreatePresentationObjects(IEnumerable<PresentationObject> elements)
		{
			var result = new PresentationObjects();
			foreach(PresentationObject element in elements) { result.Add(element); }
			return result;
		}
		public static List<PresentationObject> ToList(this PresentationObjects elements)
		{
			var result = new List<PresentationObject>();
			foreach(PresentationObject element in elements) { result.Add(element); };
			return result;
		}
		public static LabelOrgParams CreateLabelOrgParams(AttributeVariable DxMax = null, AttributeVariable DxMin = null, AttributeVariable DyMax = null, AttributeVariable DyMin = null, AttributeVariable Count = null, AttributeVariable Mode = null, AttributeVariable Enable = null, Boolean? MarkFailedLabels = null, AttributeVariable AllowLabelRemoval = null)
		{
			var instance = new LabelOrgParamsClass();
			instance.Create();
			if (DxMax != null) instance.DxMax = DxMax;
			if (DxMin != null) instance.DxMin = DxMin;
			if (DyMax != null) instance.DyMax = DyMax;
			if (DyMin != null) instance.DyMin = DyMin;
			if (Count != null) instance.Count = Count;
			if (Mode != null) instance.Mode = Mode;
			if (Enable != null) instance.Enable = Enable;
			if (MarkFailedLabels != null) instance.MarkFailedLabels = MarkFailedLabels.Value;
			if (AllowLabelRemoval != null) instance.AllowLabelRemoval = AllowLabelRemoval;
			return instance;
		}
		public static LeadLineParams CreateLeadLineParams(LeadLineAnchor? Anchor = null, AttributeVariable CutMargin = null, AttributeVariable AnchorCutMargin = null, ILineVis LineVis = null)
		{
			var instance = new LeadLineParamsClass();
			instance.Create();
			if (Anchor != null) instance.Anchor = Anchor.Value;
			if (CutMargin != null) instance.CutMargin = CutMargin;
			if (AnchorCutMargin != null) instance.AnchorCutMargin = AnchorCutMargin;
			if (LineVis != null) instance.LineVis = LineVis;
			return instance;
		}
		public static MetaData CreateMetaData(String Name, AttributeSet props, AttributeSet Properties = null)
		{
			var instance = new MetaDataClass();
			instance.Create(Name, props);
			if (Properties != null) instance.Properties = Properties;
			return instance;
		}
		public static AttributeKey CreateAttributeKey(String Name)
		{
			var instance = new AttributeKeyClass();
			instance.Create(Name);
			return instance;
		}
		public static Geometries CreateGeometries(IEnumerable<IGeometry> elements)
		{
			var result = new Geometries();
			foreach(IGeometry element in elements) { result.Add(element); }
			return result;
		}
		public static List<IGeometry> ToList(this Geometries elements)
		{
			var result = new List<IGeometry>();
			foreach(IGeometry element in elements) { result.Add(element); };
			return result;
		}
		public static PointGeometry CreatePointGeometry(Double X, Double Y, Double Z)
		{
			var instance = new PointGeometryClass();
			instance.Create(X, Y, Z);
			return instance;
		}

		public static PointGeometry CreatePointGeometryEx(Point Point, Double? X = null, Double? Y = null, Double? Z = null)
		{
			var instance = new PointGeometryClass();
			instance.CreateEx(Point);
			if (X != null) instance.X = X.Value;
			if (Y != null) instance.Y = Y.Value;
			if (Z != null) instance.Z = Z.Value;
			return instance;
		}
		public static LineGeometry CreateLineGeometry(Int32 Size, Boolean? Closed = null)
		{
			var instance = new LineGeometryClass();
			instance.Create(Size);
			if (Closed != null) instance.Closed = Closed.Value;
			return instance;
		}

		public static LineGeometry CreateLineGeometryEx(Points Point, Boolean? Closed = null, Int32? Size = null)
		{
			var instance = new LineGeometryClass();
			instance.CreateEx(Point);
			if (Closed != null) instance.Closed = Closed.Value;
			if (Size != null) instance.Size = Size.Value;
			return instance;
		}
		public static PolygonGeometry CreatePolygonGeometry(LineGeometry Outline, MultiLineGeometry Holes)
		{
			var instance = new PolygonGeometryClass();
			instance.Create(Outline, Holes);
			return instance;
		}

		public static PolygonGeometry CreatePolygonGeometryConvexHull(Geometries Geometries, LineGeometry Outline = null, MultiLineGeometry Holes = null)
		{
			var instance = new PolygonGeometryClass();
			instance.CreateConvexHull(Geometries);
			if (Outline != null) instance.Outline = Outline;
			if (Holes != null) instance.Holes = Holes;
			return instance;
		}
		public static MultiPointGeometry CreateMultiPointGeometry(Int32 Size)
		{
			var instance = new MultiPointGeometryClass();
			instance.Create(Size);
			return instance;
		}
		public static MultiLineGeometry CreateMultiLineGeometry(Int32 Size)
		{
			var instance = new MultiLineGeometryClass();
			instance.Create(Size);
			return instance;
		}
		public static MultiPolygonGeometry CreateMultiPolygonGeometry(Int32 Size)
		{
			var instance = new MultiPolygonGeometryClass();
			instance.Create(Size);
			return instance;
		}
	}
}

